package com.jing.weibo.ws.sina;

import org.springframework.stereotype.Component;

import weibo4j.Users;
import weibo4j.model.User;
import weibo4j.model.WeiboException;

/**
 * User[用户等]新浪微博的接口
 * @author jing.yue
 * @version 2012/08/29 1.0.0
 */
@Component
public class UserService {

	/**
	 * 根据用户ID获取用户信息
	 *
	 * @param uid			需要查询的用户ID
	 * @param token			授权的token
	 * @return
	 * @throws WeiboException
	 */
	public User showUserById(String uid, String token) throws WeiboException {
		Users user = new Users();
		user.setToken(token);
		User userInfo = user.showUserById(uid);
		return userInfo;
	}
}
